<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
      
    <script>
      
      var p = window.prompt();
      if(isNaN(p)==true)
      {
               alert("你输入的值错误")
      }

   function year(p)
   {
               if(p%4==0&& p%100!=0 ||p%400==0)
               {
                   alert("你输入的年份为闰年")
                   return;
               }
               alert("你输入的年份不为闰年")
                   return;    

   }
         

    </script>
</body>
</html>